#include <bits/stdc++.h>

using namespace std;

#define int long long

void solve()
{
    int n;
    cin >> n;
    int last = -1, ans = 0;
    for(int i = 0;i < n;i ++)
    {
        int a;
        cin >> a;
        if(a - last > 1)
        {
            ans ++;
            last = a;
        }
    }
    cout << ans << endl;
}
signed main()
{
    int t; cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}